Release 10.1A: OpenEdge Development:
Progress 4GL Reference
GT or > operator
Returns a TRUE value if the first of two expressions is greater than the second expression.
Syntax
expressionA constant, field name, variable name, or any combination of these. The expressions on either side of the GT or > must be of the same data type, although one might be integer and the other decimal.
ExampleThis procedure lists all items that have a negative on-hand quantity or more than 90% of the on-hand inventory currently allocated:
Notes
- By default, Progress uses the collation rules you specify to compare characters and sort records. The collation rules specified with the Collation Table (
-cpcoll) startup parameter take precedence over a collation specified for any database Progress accesses during the session, except when Progress uses or modifies pre-existing indexes. If you do not specify a collation with the -cpcollstartup parameter, Progress uses the language collation rules defined for the first database on the command line. If you do not specify a database on the command line, Progress uses the collation rules with the default name "basic" (which might or might not exist in theconvmap.cpfile).- If either of the expressions is the Unknown value (
?), then the result is the Unknown value (?); if both of the expressions are the Unknown value (?), then the result is FALSE.- You can compare character strings with GT. Most character comparisons are case insensitive in Progress. That is, upper-case and lower-case characters have the same sort value. However, it is possible to define fields and variables as case sensitive (although it is not advised, unless strict ANSI SQL adherence is required). If either
expressionis a field or variable defined as case sensitive, the comparison is case sensitive and “Smith” does not equal “smith”.- Characters are converted to their sort code values for comparison. Using the default case-sensitive collation table, all uppercase letters sort before all lowercase letters (for example, a is greater than Z, but less than b). Note also that in character code uppercase A is less than [ , \ , ^ , _, and ’ , but lowercase a is greater than these.
- You can use GT to compare DATE, DATETIME, and DATETIME-TZ data. The data type that contains less information (that is, a DATE value contains less information than a DATETIME value, and a DATETIME value contains less information than a DATETIME-TZ value) is converted to the data type with more information by setting the time value to midnight, and the time zone value to the session's time zone (when the data type does not contain the time or time zone). Comparisons with DATETIME-TZ data are based on Coordinated Universal Time (UTC) date and time.
- You can use GT to compare a LONGCHAR variable to another LONGCHAR or CHARACTER variable. The variable values are converted to
-cpinternalfor comparison and must convert without error, or Progress raises a run-time error.- You cannot use GT to compare one CLOB field to another.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |